package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.InterventionDao;
import com.itheima.domain.Intervention;
import com.itheima.service.InterventionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author M
 */

@Service

@org.springframework.stereotype.Service
public class InterventionImpl implements InterventionService {
    @Autowired
    private InterventionDao interventionDao;
    @Override
    public List<Intervention> findAll() {
        return interventionDao.findAll();
    }

    @Override
    public Intervention getById(int id) {
        return interventionDao.getById(id);
    }

    @Override
    public void update(Intervention intervention) {
        interventionDao.update(intervention);

    }

    @Override
    public void intervention_Add(Intervention intervention) {
        interventionDao.intervention_Add(intervention);
    }
}